#ifndef FILTERPROCESSOR_H
#define FILTERPROCESSOR_H

#include "Pixel.h"
#include "PixelBuffer.h"
#include "FilterMask.h"

class FilterProcessor
{
    float oldMinColor[3];
    float oldMaxColor[3];
    float newMinColor[3];
    float newMaxColor[3];

    Pixel** ApplyConvolution(Pixel** buffer, int bufferWidth, int bufferHeight, float** mask, int maskWidth, int maskHeight, PostProcessingType postProcessing);
    void SetNewPixel(Pixel* oldPixel, Pixel* newPixel, float newRVal, float newGVal, float newBVal, PostProcessingType postProcessing);
    void ResetColorRanges();

public:
    static FilterProcessor& Instance();
    void ApplyFilter(PixelBuffer* buffer, FilterType type, void* filterParameter);
};

#define g_FilterProcessor FilterProcessor::Instance()

#endif // FILTERPROCESSOR_H

